#pragma once
#include "sqlitelibrary.h"
#include "DBManager.h"
#include <Windows.h>
#include <list>
#include <map>
#include "sqlite3.h"

using namespace std;
using namespace LIBSQLITE4CONFIGSPEACE;

class CLiteConfig :
	public virtual  SQLite4Config, public virtual CFileManager, public virtual CSQLiteHandler
{
public:
	CLiteConfig(std::string configname);
	virtual ~CLiteConfig();

	static CLiteConfig*GetConfig(std::string configname);
	// Inherited via SQLite4ConfigInterface
	virtual long Insert(std::string key, std::string value, bool unique, std::string item) override;
	virtual long update(std::string key, std::string value, std::string item) override;
	virtual std::string Find(std::string key, std::string item) override;
	virtual int Remove(std::string key, std::string item) override;

private:
	static int sqlite4configcallback(void*, int, char**, char**);
	bool Initialize();
};
